package com.situ.temp;

//Java是单继承，如果一个类没有继承任何一个类，默认继承Object
public class Person /*extends Object*/{
    protected int id;
    protected String name;
    protected int age;

    //构造子类对象的时候，一定首先把父类对象构造出来
    //无参构造方法
    public Person() {
        //new Object()
        super();
    }

    //有参构造方法
    public Person(int id, String name, int age) {
        super();
        this.id = id;
        this.name = name;
        this.age = age;
    }

    public void show() {
        System.out.println("Student.show");
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
